package com.navi.loaddata.core.mysqlEntity;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;

public class QrtzEtlDetailPK implements Serializable {
    private String projectName;
    private String schedName;
    private String instanceName;
    private String relFlg;

    @Column(name = "PROJECT_NAME")
    @Id
    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    @Column(name = "SCHED_NAME")
    @Id
    public String getSchedName() {
        return schedName;
    }

    public void setSchedName(String schedName) {
        this.schedName = schedName;
    }

    @Column(name = "INSTANCE_NAME")
    @Id
    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

    @Column(name = "REL_FLG")
    @Id
    public String getRelFlg() {
        return relFlg;
    }

    public void setRelFlg(String relFlg) {
        this.relFlg = relFlg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QrtzEtlDetailPK that = (QrtzEtlDetailPK) o;

        if (projectName != null ? !projectName.equals(that.projectName) : that.projectName != null) return false;
        if (schedName != null ? !schedName.equals(that.schedName) : that.schedName != null) return false;
        if (instanceName != null ? !instanceName.equals(that.instanceName) : that.instanceName != null) return false;
        if (relFlg != null ? !relFlg.equals(that.relFlg) : that.relFlg != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = projectName != null ? projectName.hashCode() : 0;
        result = 31 * result + (schedName != null ? schedName.hashCode() : 0);
        result = 31 * result + (instanceName != null ? instanceName.hashCode() : 0);
        result = 31 * result + (relFlg != null ? relFlg.hashCode() : 0);
        return result;
    }
}
